/**
 * 
 */
package com.et114.modules.products.cellphone.dao;

import java.util.List;

import com.et114.components.simpletable.DataList;
import com.et114.components.simpletable.dao.SimpleTableDAOImpl;
import com.et114.modules.products.cellphone.vo.CellPhone;
import com.et114.modules.products.search.SearchVo;

/*
 * @author guanhw
 */
public class CellPhoneDao extends SimpleTableDAOImpl {
	
	public DataList getCellPhones( CellPhone vo ) throws Exception { 
		return queryListDataList ( vo , "getCellPhones" ) ; 
	}
	
	
	@ SuppressWarnings ( "unchecked" )
	public List< CellPhone > getCellPhones4( CellPhone vo ) throws Exception {
		return queryList( vo , "getCellPhones4" ) ;
	}
	
	
	@ SuppressWarnings ( "unchecked" )
	public List< CellPhone > getCellPhones4Manager( CellPhone vo ) throws Exception {
		return queryList( vo , "getCellPhones4Manager" ) ;
	}
	
	public Long countgetCellPhones( CellPhone vo ) throws Exception {
		return getCount( vo , "countgetCellPhones" ) ;
	}
	
	public Long countgetCellPhones4View( CellPhone vo ) throws Exception {
		return getCount( vo , "countgetCellPhones4View" ) ;
	}	
	
	
	@ SuppressWarnings ( "unchecked" )
	public List< CellPhone > getCellPhoneList( CellPhone vo ) throws Exception {
		return queryList( vo , "getCellPhonesNpage" ) ; 
	}
	
	
	
	
	@ SuppressWarnings ( "unchecked" )
	public List< CellPhone > getCellPhonesHasOffTime( CellPhone vo ) throws Exception {
		return queryList( vo , "getCellPhonesHasOffTime" ) ; 
	} 
	
	public CellPhone getCellPhoneById( Long id ) throws Exception {
		return ( CellPhone ) load( id , "getCellPhoneById" ) ; 
	}
	
	public Long saveCellPhone( CellPhone vo ) throws Exception {
		return ( Long ) insert( vo , "insertCellPhone" ) ; 
	} 
	
	public void updateCellPhone( CellPhone vo ) throws Exception {
		update( vo , "updateCellPhone" ) ; 
	}
	
	public void updateCellPhoneProOnOffStatus( CellPhone vo ) throws Exception {
		update( vo , "updateCellPhoneProOnOffStatus" ) ; 
	}
	
	
	public void removeCellPhone( Long id ) throws Exception {
		delete( id , "removeCellPhone" ) ; 
	}
	
	//for 1
	
	public DataList getCellPhones4View ( CellPhone vo ) throws Exception {
		return queryListDataList ( vo , "getCellPhones4View" );
	}
	
	public CellPhone getBaseCellPhoneInfoById4View ( CellPhone vo ) throws Exception {
		return ( CellPhone ) load ( vo , "getBaseCellPhoneInfoById4View" );
	}
	
	@ SuppressWarnings ( "unchecked" )
	public List< CellPhone > getCellPhoneTopTen(  ) throws Exception {
		CellPhone cp = new CellPhone( ) ; 
		cp.setSdTj ( true  ) ; 
		return queryList ( cp , "getCellPhones4View" );
	}

	
	public SearchVo getCellPhone4Compass( Long proId ) {
		return ( SearchVo )load(  new SearchVo( proId ) , "getCellPhone4Compass" ) ;
	}
}
